package org.springblade.modules.enterprise.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;
import org.springblade.modules.enterprise.entity.Enterprise;
import org.springframework.format.annotation.DateTimeFormat;

@Data
public class EnterprisePushVO {
	private static final long serialVersionUID = 1L;
	@JsonSerialize(using = ToStringSerializer.class)
	private Long id;
	/**
	 * 企业名称
	 */
	private String enterpriseName;
	/**
	 * 统一社会信用代码
	 */
	private String enterpriseCode;
	/**
	 * 注册资本
	 */
	private String registeredCapital;
	/**
	 * 成立日期
	 */
	@DateTimeFormat(
		pattern = "yyyy-MM-dd"
	)
	@JsonFormat(
		pattern = "yyyy-MM-dd"
	)
	private String registerDate;
	/**
	 * 法定代表人
	 */
	private String legalName;
	/**
	 * 法人身份证号码
	 */
	private String legalCard;
	/**
	 * 法人手机号
	 */
	private String mobilePhone;
	/**
	 * 联系邮箱
	 */
	private String contactEmail;
	/**
	 * 联系人
	 */
	private String linkMan;
	/**
	 * 联系方式
	 */
	private String linkPhone;
	/**
	 * 联系地址
	 */
	private String contactAddress;
	/**
	 * 银行卡号
	 */
	private String bankCode;
	/**
	 * 单位开户银行
	 */
	private String bankName;
	/**
	 * 匹配度
	 */
	private Double similarity;
	public EnterprisePushVO(Enterprise enterprise) {
		this.id = enterprise.getId();
		this.enterpriseName = enterprise.getEnterpriseName();
		this.enterpriseCode = enterprise.getEnterpriseCode();
		this.registeredCapital = enterprise.getRegisteredCapital();
		this.registerDate = enterprise.getRegisterDate();
		this.legalName = enterprise.getLegalName();
		this.legalCard = enterprise.getLegalCard();
		this.mobilePhone = enterprise.getMobilePhone();
		this.contactEmail = enterprise.getContactEmail();
		this.linkMan = enterprise.getLinkMan();
		this.linkPhone = enterprise.getLinkPhone();
		this.contactAddress = enterprise.getContactAddress();
		this.bankCode = enterprise.getBankCode();
		this.bankName = enterprise.getBankName();
	}
}
